package cz.data.domain.masterdata.rpc;

import cz.data.common.annotation.DataInner;
import cz.data.common.base.BaseResponse;
import cz.data.domain.masterdata.model.entity.ModelEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "masterdataFeign", value = "masterdata-domain-api")
public interface MasterdataFeign {

    @GetMapping("/inner/model/{id}")
    ModelEntity getModelById(@PathVariable("id") String id);

    @DataInner
    @PutMapping("/inner/model/flow/stage")
    BaseResponse updateFlowStage(@RequestBody ModelEntity request);
}
